package com.bone.payment.service;

import java.util.List;
import java.util.Map;

import com.bone.com.service.ComLogService;
import com.bone.payment.dao.PayGatewayDAO;
import com.bone.payment.dao.PayPaymentDAO;
import com.bone.payment.po.PayGateway;
import com.bone.payment.po.PayPayment;

public interface PaymentService {

	/**
	 *  保存/修改支付记录.
	 * @param payment
	 * @param operatorId
	 * @return
	 */
	boolean saveOrUpdatePayment(PayPayment payment,
			String operatorId);

	/**
	 * 取符合查询条件的标题个数.
	 * @param para
	 * @return
	 */
	Long queryPaymentCountByParam(Map<String, Object> para);

	/**
	 * 取符合查询条件的标题数据.
	 * @param para
	 * @return
	 */
	List<PayPayment> queryPaymentPageByParam(
			Map<String, Object> para);

	/**
	 *  支付记录数据列表.
	 * @param parameter
	 * @return
	 */
	List<PayPayment> queryPaymentListByParam(PayPayment payment);

	/**
	 * 根据对象NO支付交易记录.
	 * @param parameter
	 * @return
	 */
	List<PayPayment> queryPaymentListByObjectNo(Long objectNo);

	//-------------------------------------------------------------------------
	/**
	 *  保存/修改网关记录.
	 * @param payment
	 * @param operatorId
	 * @return
	 */
	boolean saveOrUpdateGateway(PayGateway gateway,
			String operatorId);

	/**
	 * 取符合查询条件的网关记录个数.
	 * @param para
	 * @return
	 */
	Long queryGatewayCountByParam(Map<String, Object> para);

	/**
	 * 取符合查询条件的网关记录数据.
	 * @param para
	 * @return
	 */
	List<PayPayment> queryGatewayPageByParam(
			Map<String, Object> para);

	/**
	 * 取符合查询条件的网关记录数据.
	 * @param para
	 * @return
	 */
	List<PayPayment> queryGatewayListByParam(
			Map<String, Object> para);

	/**
	 * 根据网关ID取网关信息.
	 * @param gatewayId
	 * @return
	 */
	PayGateway queryGatewayById(Long gatewayId);

	PayPaymentDAO getPayPaymentDAO();

	void setPayPaymentDAO(PayPaymentDAO payPaymentDAO);

	PayGatewayDAO getPayGatewayDAO();

	void setPayGatewayDAO(PayGatewayDAO payGatewayDAO);

	ComLogService getComLogService();

	void setComLogService(ComLogService comLogService);

}